/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package interfaz.gestionEstandares;

import java.util.ArrayList;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author chesp
 */
public class EstandaresTableModel extends DefaultTableModel{
    
    private ArrayList<Object[]> datosTabla;
    private int numCols;
    private String[] nombreCols;
    private Class[] tipoCols;
    private boolean[] editables;
    
    public EstandaresTableModel(String[] nombreCols, Class[] tipoCols, boolean[] editables) {
        initComponents(nombreCols, tipoCols, editables);
    }
    
    private void initComponents(String[] nombreCols, Class[] tipoCols, boolean[] editables)
            throws IllegalArgumentException {
        if (nombreCols.length != tipoCols.length || tipoCols.length != editables.length) {
            throw new IllegalArgumentException("The arrays passed as parameters must be of the same size");
        }
        
        datosTabla = new ArrayList<Object[]>();
        this.numCols = nombreCols.length;
        this.nombreCols = nombreCols;
        this.tipoCols = tipoCols;
        this.editables = editables;
    }
    
        
    
    
}
